package io;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class CopyDmeo {
    public static void main(String[] args) throws IOException, InterruptedException {
        FileInputStream fis = new FileInputStream("XYY04135.JPG");
        FileOutputStream fos = new FileOutputStream("iXYY04135_cp.JPG");
        int d;
        //当前系统时间  毫秒值
        long i=System.currentTimeMillis();
        while ((d = fis.read()) != -1) {
            fos.write(d);
        }
        System.out.println(System.currentTimeMillis()-i+"ms");
        System.out.println("复制完毕");
        fis.close();
        fos.close();
    }
}
